package com.qys.livesMall.financial.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qys.livesMall.financial.model.entity.FinancialOnlineUser;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 用户每日理财收益 Mapper 接口
 * </p>
 *
 * @author
 * @since 2023-06-13
 */
public interface FinancialOnlineUserMapper extends BaseMapper<FinancialOnlineUser> {

    /**
     * 根据用户id与产品id计算总收益
     *
     * @param userId
     * @param financialId
     * @return
     */
    BigDecimal sumAmountByUserIdAndFinancialId(@Param("userId") Long userId, @Param("ids") List<Long> ids);
}
